home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / doc / dna_segmentation.me < prev    next >
Encoding:
Text File  |  1991-09-17  |  19.9 KB  |  549 lines

  1. .\" to print: iroff -me file
  2. .de sZ
  3. .nr pp 12
  4. .nr tp 12
  5. .nr sp 12
  6. .nr fp 12
  7. .sz 12
  8. ..
  9. .de sY
  10. .nr pp 10
  11. .nr tp 10
  12. .nr sp 10
  13. .nr fp 10
  14. .sz 10
  15. ..
  16. .sZ
  17. .if n .po 3
  18. .\".if n .pl 999
  19. .if n .ll 70
  20. .if n .ad l
  21. .\".he '\f3DRAFT'DRAFT'DRAFT\f1'
  22. .\"
  23. .fo //\s-4-%-\ \ \ \ \ \ \ \*(td\s+4//      \" put page numb and date in footer
  24. .nr $r 12        \" set vertical spacing (in terms of some ratio) 
  25. .\" .so refer.me.new
  26. .ce 99
  27. .sz 16
  28. \s+2\f3Geometric Analysis of Video Microscopy Imaged\f1
  29. \s+2\f3DNA Molecules\f1
  30. .sp .2i
  31. .sZ
  32. .i
  33. .sp .5
  34. B. L. Tierney\u*\d
  35. W. E. Johnston\u*\d
  36. Information and Computing Sciences Division
  37. Imaging Technologies Group
  38. .sp .5
  39. M. F. Maestre\u**\d
  40. Cell and Molecular Biology Division
  41. .sp .5
  42. Lawrence Berkeley Laboratory
  43. Berkeley, CA, 94720
  44. .r
  45. .(f
  46. .sz 10
  47. USMail address: Lawrence
  48. Berkeley Laboratory, Berkeley, CA 94720.
  49. \u*\dMail Stop 50B-3238, \u**\dMail Stop 70A-3307,
  50. Berkeley Laboratory, Berkeley, CA 94720.
  51. Internet email addresses are:
  52. wejohnston@lbl.gov, bltierney@lbl.gov, mfmaestre@lbl.gov.
  53. The work presented in this paper is supported by
  54. \u*\dthe U.S. Department of Energy under contract DE-AC03-76SF00098,
  55. by the LBL Human Genome Center, and by \u**\dNational Institutes of Health
  56. under grant AI08427.
  57. Any conclusions or opinions, or implied approval or disapproval of a company or
  58. product name are solely those of the authors and not necessarily those
  59. of The Regents of the University of California, the Lawrence Berkeley
  60. Laboratory, or the U.S. Department of Energy.
  61. Trademarks are acknowledged implicitly by the use of a company's name
  62. or product name.
  63. .sz 12
  64. .)f
  65. .sp
  66. .ce
  67. \f3ABSTRACT\f1
  68. .sY
  69. .pp
  70. We describe techniques that permit the
  71. visualization and analysis of sequences of images
  72. from video microscopy
  73. of DNA molecules in a micro-electrode chamber.
  74. The resulting images are enhanced and segmented to obtain identifiable
  75. images of single molecules. These single molecule images are then analyzed
  76. to obtain the geometric properties of the molecule. The result is a
  77. sequence of accurately timed, coordinate representations of single
  78. molecules undergoing various periodic and aperiodic motions that result
  79. from the applied electric field. These sequences of coordinates are
  80. then analyzed to get the kinematic behavior of individual molecules.
  81. .pp
  82. Accurate segmentation of the DNA molecules in the image is critical in determining
  83. the geometry of the molecules. This paper examines
  84. the steps for segmentation and geometric analysis. The techniques
  85. are quite general, and have been applied to other problems
  86. where the geometry of objects in low contrast 
  87. video image sequences must be extracted for analysis.
  88. .sZ
  89. .sp 2
  90. .sh 1 "Introduction"
  91. .pp
  92. While the techniques to be discussed here are quite general, we will consider them
  93. in the context of a specific experiment. Fluorescently stained DNA molecules
  94. (each on the order of 60 microns long) are placed in
  95. a micro-electrode chamber with a spatially distributed
  96. electrode network of microscopic dimensions.
  97. The electrode array is used to apply various configurations
  98. of electric fields to the molecule.
  99. These fields result in mechanical forces being
  100. applied to the molecules, which in turn cause movement, stretching,
  101. vibrations, etc.
  102. An image intensifier tube and CCD video camera are used in conjunction
  103. with an epi-fluorescence microscope to image the molecules.
  104. This video microscopy
  105. imaging is done in real time, with relevant time intervals on the order of
  106. 1/30th second. Time sequences are captured by video recording, and
  107. the resulting video frames converted to digital images
  108. by the application of video animation hardware as described in a companion
  109. paper [1].
  110. The resulting sequence of digital images is subjected to image processing and
  111. analysis to obtain the geometry
  112. of DNA molecules from an image, from which
  113. the kinematic behavior of the molecules is determined.
  114. Analysis of the kinematic behavior can lead to
  115. direct determination of the elastic properties, and therefore
  116. bond strengths, in the molecule.  In the images shown in this paper
  117. the electromagnetic
  118. field is stretching the molecule, and the stretched DNA 
  119. appears to exhibit some of the harmonic motions of a taut string.
  120. We use the frame by frame
  121. geometry changes in the images of the molecules to measure 
  122. the period and frequency of the displacement waves traveling the length of
  123. the DNA molecule.
  124. .sp
  125. .sh 1 "Segmentation Method"
  126. .pp
  127. Accurate segmentation of the images of the DNA molecules is critical in determining
  128. the geometry of the molecules.
  129. This segmentation is non-trivial because the images
  130. are noisy, and the contrast between the DNA molecules
  131. and the background
  132. is low. Furthermore, the grey level intensity of a given
  133. molecule is not uniform, and molecules often overlay
  134. other molecules. The following method of segmentation, which
  135. involves image enhancement, thresholding, thinning and cleaning,
  136. was found to give semi-automatic techniques suitable
  137. for analyzing sequences of hundreds of images.
  138. Each step in the processes
  139. is explained below.
  140. .sp
  141. .sh 2 "Image Enhancement"
  142. .pp
  143. Starting with the original image (see Image 1), we
  144. first contrast
  145. enhance the image so that the molecules are better distinguished
  146. from the background. To do this we use the \f3mahe\f1 program, which is
  147. an implementation of Stephen Pizer's clipped
  148. adaptive histogram equalization algorithm [2] (see Image 2). 
  149. In histogram equalization, an image is transformed to have a 
  150. uniform gray level distribution.
  151. This has the effect of spreading the contrast based information across
  152. more gray levels, therefore making low-contrast features more visible.
  153. In adaptive histogram equalization, a histogram equalization
  154. mapping is applied to each pixel based on the pixels in
  155. a region centered at that pixel. In other words, 
  156. each pixel is mapped to an intensity proportional
  157. to its rank in the pixels surrounding it in a given window size.
  158. For these images, a window of 100 x 100 pixels was used. ``Clipped''
  159. refers to a method used to limit the number of pixels
  160. in any bucket of the histogram. This has the effect of limiting
  161. the effects of  noise  in  the  histogram equalization process.
  162. .pp
  163. Next we further enhance the image by applying a difference of 
  164. Gaussians operation (\f3dog\f1) (see Image 3). The difference of
  165. Gaussians [3] method is one method of implementing a ``Mexican hat''
  166. filter. This filter has the effect of suppressing the background near the
  167. edge of the molecules.
  168. .pp
  169. There are three arguments to this program, \f2esigma, masksize\f1, and \f2ratio\f1.
  170. \f2esigma\f1 is  the standard  deviation  of  the  ``excitatory'' Gaussian,
  171. \f2masksize\f1  is  the  spatial size  of  the Gaussian, and  \f2ratio\f1  is the
  172. ratio between the standard deviations of the inhibitory and
  173. excitatory  Gaussians. For these images, \f2esigma\f1 was set at 1.5, \f2masksize\f1
  174. to 20, and \f2ratio\f1 to 8.\  \f2esigma\f1 values greater than 1 cause a
  175. blurring of the images, which is useful for getting smoother images
  176. with \f3bthin\f1 (see below).\  \f2masksize\f1 was set to be slightly larger
  177. than the width of the DNA molecule, and a large \f2ratio\f1 value was used
  178. to give greater contrast between the molecules and the background,
  179. but many will still suffer from overlap with other molecules.
  180. .pp
  181. Next we do a histogram equalization of the image (\f3histoeq\f1) 
  182. (see Image 4). This is just a standard histogram 
  183. equalization [4], which is described above.
  184. The combination of the difference of Gaussians filter with histogram
  185. equalization leads to a image in which the DNA molecules are
  186. clearly separated from the background.
  187. .sp
  188. .sh 2 "Thresholding"
  189. .pp
  190. Now that we have an image in which the DNA molecules clearly stand
  191. out from the background, we can threshold the image to create
  192. a binary image ``mask''. In a binary image, each pixel has a value 
  193. of either 0 or 1 (actually 0 or 255 in a 1 byte per pixel format).
  194. We can use either a simple or variable threshold (\f3thresh\f1 or
  195. \f3var_thresh\f1) method to do the thresholding ( see Image 5).
  196. .pp
  197. In simple thresholding, all locations with a grey level value
  198. less than a given value are set to 0, and all other locations
  199. are set to 255 (see [5]). In variable thresholding, for each pixel we find the
  200. histogram of a N x N pixel window centered
  201. at that pixel, and include that pixel only if it's value is greater
  202. than the median of the histogram. Variable thresholding is
  203. much slower (it takes about 5 minutes for one 400 x 512 image on
  204. a Sun-4), but it can produce better segmentation, 
  205. especially on noisy images.
  206. .pp
  207. Next, since we know that the objects of interest are
  208. the largest objects in the image, we ``clean'' the small objects away.
  209. To accomplish this the \f3bclean\f1
  210. program counts the number of pixels in each object of
  211. the binary mask image, and removes all objects which are
  212. smaller than a given size (see Image 6).
  213. .pp
  214. At this point we have finished the first level of segmentation.
  215. However, it is not completely accurate because of the nature of the original
  216. images.  Since the molecules are in motion, they often cross, drift,
  217. break up, or in other ways interfere with the molecule that we
  218. are analyzing.
  219. (Note the bump along the lower edge of the long molecule
  220. near the center of Image 6). It is easy for the experimenter
  221. to see these segmentation flaws, but
  222. difficult to make a computer ``see'' them.
  223. .pp
  224. To solve this problem, we use \f3segal\f1, (SEGmentation AnaLyzer), 
  225. to interactively ``touch up'' the binary image.
  226. \f3segal\f1 is a X-window system\** based program for editing binary images.
  227. .(f
  228. \** Window systems like SunView, X, Gem, that of the Macintosh, etc.,
  229. are programs to manage the frame buffer of an interactive workstation.
  230. The window system creates, destroys, and generally manages the windows
  231. on the screen, each of which may be associated with
  232. a different program. The X system was developed at MIT, and is noteworthy
  233. for the fact that it is a distributed system, and runs on a wide
  234. variety of workstations. That is, the client, or
  235. application program, that requests a window and subsequently draws
  236. into it, may reside on a computer other than the workstation
  237. that the user interacts with.
  238. .)f
  239. This program has the ability to overlay the original gray-level
  240. image with a transparent version of the binary mask image to help the user determine
  241. where the
  242. mask should be cut away to best match the features of interest.
  243. The program also allows the user to select between various
  244. size and shape of paint/erase cursors, zoom magnifications, and so forth.
  245. Image 6 was converted to Image 7 by using \f3segal\f1
  246. to remove the protrusions that are artifacts of overlaid
  247. molecules. Figure 1 illustrates the user interface presented by the \f3segal\f1
  248. mask editor.
  249. .sp
  250. .sh 2 "Thinning"
  251. .pp
  252. The next step is to thin the objects in the image to a single pixel width line
  253. (see Image 8), which we do with the program \f3bthin\f1.
  254. To analyze the kinematic behavior of the molecules, it is
  255. best to represent the molecule as a line only one pixel wide, which
  256. follows the center of the molecule.
  257. (The initial attempt to use morphological dilate and contract operations
  258. to accomplish this were not satisfactory. This approach tended
  259. to produce a line that was off center, and had ``whiskers''.)
  260. The program
  261. \f3bthin\f1 finds the desired centerline.
  262. .pp
  263. The thin algorithm is the following:
  264. For every pixel that is part of
  265. an object, find the end points for horizontal and vertical
  266. lines contained in the object at that point. Use the center of the shorter line as
  267. the point in the thinned image ( see Figures 2 and 3 ). This is a
  268. very simple method which seems to work well. As an example,
  269. look at pixel (6,3) in Figure 2. The horizontal line through that
  270. point has a length of 5 pixels, and the vertical line 3 pixels. Then
  271. taking the center of the shorter line, we select location (6,4)
  272. for the thinned image.
  273. .pp
  274. This algorithm is overly simplistic and leaves some artifacts,
  275. which are easily corrected using the programs \f3bclean\f1 and
  276. \f3fill_holes\f1. Single pixel wide bumps will often become
  277. disconnected, (location (7,6) in Figure 2, and location (3,2) in Figure 3),
  278. but are easily removed using \f3bclean\f1.
  279. The other problem is that holes of one or 
  280. two pixels wide often occur at bends in the objects, as demonstrated
  281. in Figure 3, location (9,3).
  282. This problem is corrected using the program \f3fill_holes\f1,
  283. which locates the end of lines, searches for nearby
  284. ends of lines, and connects the two endpoints if they are within a
  285. given distance of each other.
  286. Also, the thinned lines representing the molecules sometimes have small
  287. holes due to the uneveness of the intensity of the original
  288. image. This problem is also easily corrected using \f3fill_holes\f1
  289. ( see Image 9 ).
  290. .pp
  291. The final step is a second ``cleaning'' of the image using \f3Bclean\f1,
  292. which yields our final image which contains only the molecule
  293. that we are analyzing (see Image 10).
  294. .pp
  295. Image 11 is an overlay of image 2 and image 10, and 
  296. provides verification that the geometric representation of the molecule
  297. is in fact a reasonable representation of the original object.
  298. .sp
  299. .sh 2 "Extract the Geometry"
  300. .pp
  301. At this point we are ready to extract the geometry of the DNA molecules
  302. in Image 10. To do this, we want to get a list of the (x,y)
  303. locations of each pixel in each object. This list
  304. of points can then be used as input to various programs
  305. to analyze the geometric harmonic properties properties of the DNA molecules.
  306. The program \f3printxyz\f1 outputs a list
  307. of the (x,y) locations of the pixels in each object.
  308. \f3printxyz\f1 does this by locating an object, then doing a flood fill 
  309. to find the coordinates of all points in that object, marking
  310. the points so that they will not be listed twice.
  311. .pp
  312. We have illustrated these techniques for a  single image, however in practice we
  313. are analyzing the motion of the DNA molecules in time, so the \f3printxyz\f1
  314. program also gives the third dimension (z), which in this case is time.
  315. By analyzing the coordinates of the molecules over time, the kinematic
  316. behavior can be obtained.
  317. Typical results (both from different data sets than that from which
  318. Images 1-11 were taken) are shown in Figures 4 and 5. In the data
  319. for Figure 4, a molecule
  320. was being pulled through a ``hook'' (like a rope being pulled through
  321. a pulley). Figure 4, itself, is the result of plotting the locations of the
  322. molecule over a dozen, or so, time steps. The shorting of one side
  323. and lengthening of the other is clearly apparent.
  324. The ``pulley'' is eliminated during the image analysis phase,
  325. hence the apparent disconnection at
  326. the right hand end. The ``staircasing'' is due to the inherent
  327. resolution of the image. The scale shows coordinates in pixel units,
  328. and is small enough that the effects of individual pixel resolution
  329. units are clearly visible.
  330. .pp
  331. In Figure 5, a molecule is constrained at one end, and an electric field
  332. is applied.
  333. The thirty six
  334. subsequent
  335. frames are plotted with time as the third axis, and the x-y-t combination
  336. displayed as a surface.
  337. From the figure it can be seen that the impulse like force resulting from
  338. the application of the electric field gives rise to a set of clearly visible
  339. oscillations in several different modes (that is, both transverse
  340. and longitudinal to the long axis of the DNA molecule).
  341. .sp
  342. .sh 2 "Implementation"
  343. .pp
  344. All of the above algorithms are implemented as HIPS [6] programs and run 
  345. on a Sun-4 workstation. The programs \f3dog\f1, 
  346. \f3histoeq\f1, and \f3thresh\f1 
  347. are part of the HIPS image processing software package, 
  348. developed at New York University.
  349. \f3 mahe\f1 is from the University of North Carolina,
  350. Department of  Computer Science, and modified by us to handle HIPS images.
  351. All other programs were designed and coded as part of this project.
  352. Total processing time is about two minutes
  353. on a Sun-4 for one 200 x 300  pixel image. This does not include the time
  354. for editing the binary image using \f3segal\f1. The time for
  355. \f3segal\f1 depends on the amount of editing to be done, but for most
  356. images is only about 1-2 minutes.
  357. .pp
  358. All of these programs (except \f3segal\f1) are implemented
  359. as UNIX filters [7]. Thus, to use the filters, standard input and
  360. standard output are used for image input and output, respectively.
  361. For example:
  362. .sp
  363. .sz 10
  364. .ft C
  365. .fl
  366. .\".cs 1 22
  367. .nf
  368. .na
  369. .lg 0
  370.    Bclean -s 200 < in_image_file > out_image_file
  371.    dog 1.5 20 8.0 < in_file | scale_gray | thresh -t 180 > out_file
  372. .\".cs
  373. .fl
  374. .fi
  375. .ad b
  376. .ft R
  377. .sz 12
  378. .lg
  379. .fl
  380. Where ``<'' and ``>'' indicate i/o redirection to a disk file, and ``|''
  381. connects the output of one program to the input of the next (see [7]).
  382. .pp
  383. All of the steps involved can be combined into a Unix shell script [7]
  384. that appears as a single program to the user.
  385. For example
  386. .sz 10
  387. .fl
  388. .ft C
  389. .nf
  390. .na
  391. .lg 0
  392.    seg_dna video_image_1 seg_image_1
  393. .cs
  394. .fi
  395. .ad b
  396. .fl
  397. .ft R
  398. .sz 12
  399. .lg
  400. Would invoke
  401. the following simple script (called ``seg_dna'') to produce an image similar to Image 10.
  402. .sp
  403. .fl
  404. .ft C
  405. .sz 10
  406. .\".cs 1 22
  407. .nf
  408. .na
  409. .lg 0
  410. -----------------------------------------------------------
  411. #! /bin/csh
  412. # usage: seg_dna video_image processed_image
  413. # segment dna images
  414. set th1 = 200
  415. set inname = $argv[1]
  416. set outname = $inname.segment
  417.  
  418. mahe -H -c 6.0 -W 100 100 < $inname | scale_gray > temp1
  419. dog 1.5 20 8.0 <  temp1 | scale_gray | histoeq > temp2
  420. rm -f temp1
  421. thresh -t  $th1 < temp2 | Bclean -s 400 >  temp1
  422. bthin < temp1 | fill_holes -e -s 5 | Bclean -s 300 > $outname
  423.  
  424. rm -f temp1 temp2
  425. echo " segmentation done. "
  426. -----------------------------------------------------------
  427. .fl
  428. .ft R
  429. .fi
  430. .ad b
  431. .lg
  432. .sp
  433. .pp
  434. This script does not include \f3segal\f1, so in practice one would
  435. need two separate scripts, using \f3segal\f1 before running \f3bthin\f1.
  436. \f3scale_gray\f1 is needed to scale the integer output of \f3mahe\f1
  437. and the floating point output of \f3dog\f1 back to bytes.
  438. .sp 2
  439. .sh 1 "Conclusions"
  440. .pp
  441. This work illustrates a method for segmenting and extracting the geometry of 
  442. video imaged DNA molecules. As is often the case in image processing,
  443. there certainly are other combinations of image filters that will give
  444. similar results. The analysis that needs to be accomplished for these
  445. images is an example of a case where a completely automatic
  446. method would be difficult, but an interactive step, such as
  447. the \f3segal\f1 mask editor, allows for easily incorporating
  448. the knowledge of the experimenter to perform such tasks as removing segmentation
  449. flaws (e.g. the bump in image 6).
  450. These techniques and programs have been successfully used to segment and extract
  451. geometry for several experiments involving low contrast video images.
  452. .sp 2
  453. .ce
  454. \f3References\f1
  455. .fl
  456. .nr pp 11
  457. .nr tp 11
  458. .nr sp 11
  459. .nr fp 10
  460. .sz 11
  461. .sp
  462. .\"
  463. .\" types of reference forms: 1: journal-artical 2: book,
  464. .\"               3: article in book 4:tech-report
  465. .]<
  466. .]-
  467. .ds [F [1]
  468. .ds [A W. E. Johnston
  469. .as [A ", D. Robertson
  470. .as [A ",and B. Tierney
  471. .ds [T Acquisition of Digital Images from Video Tape
  472. .ds [J (this proceedings)
  473. .nr [T 0
  474. .nr [A 0
  475. .nr [O 0
  476. .][ 1 journal-article
  477. .]-
  478. .ds [F [2]
  479. .ds [A S.M. Pizer
  480. .as [A ", et al.
  481. .ds [T Adaptive Histogram Equalization and Its Variations
  482. .ds [J Computer Vision, Graphics, and Image processing
  483. .ds [V 39
  484. .ds [D 1987
  485. .nr [T 0
  486. .nr [A 0
  487. .nr [O 0
  488. .][ 1 journal-article
  489. .]-
  490. .ds [F [3]
  491. .ds [A D. Marr
  492. .as [A ", E. Hildreth
  493. .ds [T Theory of Edge Detection
  494. .ds [J Proceedings of the Royal Society of London
  495. .ds [V B 207
  496. .ds [D 1980
  497. .nr [T 0
  498. .nr [A 0
  499. .nr [O 0
  500. .][ 1 journal-article
  501. .]-
  502. .ds [F [4]
  503. .ds [A M. James
  504. .ds [T Pattern Recognition
  505. .ds [I John Wiley & Sons
  506. .ds [D 1988
  507. .nr [T 0
  508. .nr [A 0
  509. .nr [O 0
  510. .][ 2 book
  511. .]-
  512. .ds [F [5]
  513. .ds [A P.K. Sahoo
  514. .as [A ", S. Soltani
  515. .as [A ", A.K.C. Wong
  516. .ds [T A Survey of Thresholding Techniques
  517. .ds [J Computer Vision, Graphics, and Image Processing
  518. .ds [V 41
  519. .ds [D 1988
  520. .nr [T 0
  521. .nr [A 0
  522. .nr [O 0
  523. .][ 1 journal-article
  524. .]-
  525. .ds [F [6]
  526. .ds [A M.S. Landy
  527. .as [A ", Y. Cohen
  528. .as [A ", G. Sperling
  529. .ds [T HIPS: A Unix-based Image Processing System
  530. .ds [J Computer Vision, Graphics, and Image processing
  531. .ds [V 25
  532. .ds [D 1984
  533. .ds [O For more information contact Mike Landy, P.O. Box 373, Prince Street Station, New York, NY  10012-0007
  534. .nr [T 0
  535. .nr [A 0
  536. .nr [O 0
  537. .][ 1 journal-article
  538. .]-
  539. .ds [F [7]
  540. .ds [A H. McGilton, R. Morgan
  541. .ds [T Introducing the UNIX System
  542. .ds [I McGraw-Hill
  543. .ds [D 1983
  544. .nr [T 0
  545. .nr [A 0
  546. .nr [O 0
  547. .][ 2 book
  548. .]-
  549.